package com.lhkj.ct.meta.modules.scheduling.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.lhkj.ct.base.json.MyLocalTimeDeserializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.time.LocalTime;

/**
 * <p>
 * 排班模板详情
 * </p>
 *
 * @author jobob
 * @since 2023-10-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TblScheMouldTime对象", description="排班模板详情")
public class TblScheMouldTime implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "排班模板时间id")
    private String id;

    @ApiModelProperty(value = "模板id")
    private String mouldId;

    @NotNull(message = "开始时间不能为null")
    @ApiModelProperty(value = "开始时间")
    @JsonDeserialize(using = MyLocalTimeDeserializer.class)
    @JsonFormat(pattern = "HH:mm")
    private LocalTime startTime;

    @NotNull(message = "截止时间不能为null")
    @ApiModelProperty(value = "截止时间")
    @JsonDeserialize(using = MyLocalTimeDeserializer.class)
    @JsonFormat(pattern = "HH:mm")
    private LocalTime endTime;

    @NotNull(message = "号源数量不能为null")
    @Positive(message = "号源数量必须大于0")
    @ApiModelProperty(value = "号源数量")
    private Integer sourceNum;


}
